projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e31e885
)
places sidebar: Make a function NULL-safe
author
Matthias Clasen
<mclasen@redhat.com>
Wed, 28 Jan 2015 23:25:32 +0000
(18:25 -0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Wed, 28 Jan 2015 23:25:32 +0000
(18:25 -0500)
gtk_places_sidebar_set_location's location argument is documented
as allow-none, but if one actually passes NULL, a warning results.
Fix that.
gtk/gtkplacessidebar.c
patch
|
blob
|
history
diff --git
a/gtk/gtkplacessidebar.c
b/gtk/gtkplacessidebar.c
index d6d3dd6000dba533eb38361e9e895b80d3abb8ef..fecb94f0a2d0b86bf524d703bb2ff2af51526357 100644
(file)
--- a/
gtk/gtkplacessidebar.c
+++ b/
gtk/gtkplacessidebar.c
@@
-4790,7
+4790,9
@@
gtk_places_sidebar_set_location (GtkPlacesSidebar *sidebar,
if (sidebar->current_location != NULL)
g_object_unref (sidebar->current_location);
- sidebar->current_location = g_object_ref (location);
+ sidebar->current_location = location;
+ if (sidebar->current_location != NULL)
+ g_object_ref (sidebar->current_location);
if (location == NULL)
goto out;